// 节流函数
function throttle(fn, wait) {
    let delay = wait || 500;
    let timer = null
    return function() {
        if (timer) {
            console.log('拦截');
            return
        }
        timer = setTimeout(() => {
            console.log('发送');
            fn.apply(this, arguments)
            timer = null
        }, delay)
    }
}
module.exports = {
	throttle
}
